//
import axios from './index.js'

//发送验证码
export function sendSms(params){
    return axios.post('/user/sendSms',params)
}

//忘记密码
export function forGet(params){
    return axios.post('/user/forget',params)
}
//获取用户信息
export function getuserInfo(params){
    return axios.post('/user/getuserInfo',params)
}
//搜索
export function search(params){
    return axios.post('/api/search',params)
}
//收藏文章
export function addFav(params){
    return axios.post('/api/add_fav',params)
}
//取消收藏
export function removeFav(params){
    return axios.post('/api/remove_fav',params)
}
//文章点赞
export function articleLike(params){
    return axios.post('/api/like',params)
}
//取消文章点赞
export function articleUnike(params){
    return axios.post('/api/unlike',params)
}

//收藏列表
export function getFavList(params){
    return axios.post('/api/get_fav_list',params)
}

//获取评论列表
export function getCommentList(params){
    return axios.post('/api/get_comment_list',params)
}

//评论
export function addComment(params){
    return axios.post('/api/add_comment',params)
}
//回复列表
export function getReplyList(params){
    return axios.post('/api/get_reply_list',params)
}
//评论点赞
export function commentLike(params){
    return axios.post('/api/comment_like',params)
}
//取消评论点赞
export function commentUnlike(params){
    return axios.post('/api/comment_unlike',params)
}
//上传到七牛
// export function uploadQiniu(formdata){
//     return axios.post('/https://upload-z1.qiniup.com',formdata)
// }
//获取token
export function getToken(){
    return axios.get('/upload/token')
}
//浏览历史
export function getHistoryList(params){
    return axios.get('/api/get_history_list',params)
}